package com.zqu.service.impl;

import com.zqu.mapper.ReimbursementDetailMapper;
import com.zqu.pojo.ReimbursementDetail;
import com.zqu.service.ReimbursementDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class ReimbursementDetailServiceImpl implements ReimbursementDetailService {
    @Autowired
    private ReimbursementDetailMapper reimbursementDetailMapper;

    @Override
    public ReimbursementDetail findT(long id) {
        return reimbursementDetailMapper.selectTById(id);
    }

    @Override
    public List<ReimbursementDetail> selectList(ReimbursementDetail reimbursementDetail) {
        return reimbursementDetailMapper.selectList(reimbursementDetail);
    }

    @Override
    public boolean insertT(ReimbursementDetail reimbursementDetail) {
        int flag = reimbursementDetailMapper.insertT(reimbursementDetail);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean updateT(ReimbursementDetail reimbursementDetail) {
        int flag = reimbursementDetailMapper.updateT(reimbursementDetail);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteT(long id) {
        int flag = reimbursementDetailMapper.deleteT(id);
        if(flag>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteTByIds(String[] ids) {
        int flag = reimbursementDetailMapper.deleteTByIds(ids);
        if(flag>0){
            return true;
        }
        return false;
    }
}
